var log4js = require('log4js');
log4js.configure({
appenders: {
production: {
type: 'dateFile', 
filename: 'demo.log', 
alwaysIncludePattern: true, 
keepFileExt: true, 
daysToKeep: 30, 
}
},
categories: {
default: { appenders: [ 'production' ], level: 'info' }
}
});
var logger = log4js.getLogger();
logger.info('this is a info3');